#ifndef PLAYLIST_H
#define PLAYLIST_H

#include "list.h"
#include "song.h"
#include "songexporter.h"

enum SortBy {
	TITLE, ARTIST, ALBUM
};

class PlayList
{
public:
	PlayList();

	void addSong(Song *song);
	List<Song*> *getSongs();
	PlayList static loadFromFile(QString filename);
	void saveToFile(QString filename);
	void sort(SortBy sortMode);
	QString getPlayListPath();
	void setPlayListPath(QString);
	Song *getNextSong();
	Song *getPreviousSong();
	Song *getSong(int index);
	void setRepeat(bool repeat);
	int currentIndex();
    void exportPlaylistTo(QString path);
private:
	List<Song*> *listSongs;
	bool repeat;
	QString playListPath;
	int index;
    SongExporter *songExporter;

};

#endif // PLAYLIST_H
